package com.wuhan.template.module.find.activity;

import com.google.gson.Gson;
import com.wuhan.template.R;
import com.wuhan.template.base.BaseActivity;
import com.wuhan.template.constant.Urls;
import com.wuhan.template.module.find.bean.WeatherBean;
import com.wuhan.template.utils.EventMessage;
import com.wuhan.template.utils.OkHttpUtils;

/**
 * Created by Administrator on 2016/5/14.
 */
public class WeatherActivity extends BaseActivity {
    @Override
    protected int getLayoutId() {
        return R.layout.activity_weather_layout;
    }

    @Override
    protected void loadData() {
        OkHttpUtils.get(Urls.WEATHER,null);
    }

    @Override
    public void onGetResult(EventMessage message) {
        super.onGetResult(message);
        if(message.type.equals(Urls.WEATHER)){
            Gson gson = new Gson();
            WeatherBean[] weatherBean = gson.fromJson(message.result, WeatherBean[].class);
            weatherBean[0].getImg();
        }

    }
}
